<div nz-row>
  <form nz-form [formGroup]="form" (ngSubmit)="submitForm(form.value)">
    <nz-form-item>
      <nz-form-label [nzSpan]="7" nzRequired>项目名</nz-form-label>
      <nz-form-control [nzSpan]="12" nzHasFeedback [nzErrorTip]="nameErrorTpl">
        <input nz-input formControlName="name" placeholder="请输入项目名"/>
        <ng-template #nameErrorTpl let-control>
          <ng-container *ngIf="control.hasError('required')">
            请输入项目名!
          </ng-container>
        </ng-template>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-control [nzOffset]="7" [nzSpan]="12">
        <button nz-button nzType="primary" [disabled]="!form.valid">提交</button>
        <button nz-button (click)="resetForm($event)">清空</button>
      </nz-form-control>
    </nz-form-item>
  </form>
</div>
